<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : tinHot_2.xsl
    Created on : March 10, 2012, 10:53 AM
    Author     : huanht
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">

        <xsl:for-each select="//tindang[@status!='delete']">

            <xsl:sort select="soluotxem" order="descending"/>
            <xsl:if test="not (position()>5)">
                <html>
                    <head>
                        <title></title>
                    </head>
                    <body>
                        <table width="500px" >
                            <tr>
                                <td rowspan="6" width="100px" >
                                    <img src="{hinhanh}" border="1" width="100px"/>
                                </td>
                                <form action="chitietnhadat.do" method="post">
                                    <td>
                                        <b><xsl:value-of select="tieudetin"/></b>
                                    </td>
                                </form>
                            </tr>

                            <tr>
                                <td>
                                    <div style="font-size: 10px; font-style: italic;">Lần cuối cập nhật: 
                                        <xsl:value-of select="lancuoicapnhat"/>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <xsl:value-of select="tenloaitin"/>
                                </td>
                            </tr>
                            <tr>
                                <td><b>Vị trí: </b>
                                    <xsl:value-of select="khuvuc/quanhuyen"/>,
                                    <xsl:value-of select="khuvuc/tinhthanh"/>
                                </td>
                            </tr>
                            <tr>
                                <td><b>DTKV: </b>
                                    <xsl:value-of select="dientichkhuonvien/solieu"/>
                                    <xsl:value-of select="dientichkhuonvien/dvddientichkhuonvien"/> / 
                                    <b>DTXD: </b>
                                    <xsl:value-of select="dientichxaydung/solieu"/>
                                    <xsl:value-of select="dientichxaydung/dvddientichxaydung"/>
                                </td>
                            </tr>
                            <tr>
                                <td><b>Giá: </b>
                                    <xsl:value-of select="giatien/solieu"/><xsl:text> </xsl:text>
                                    <xsl:value-of select="giatien/dvdgiatien"/>
                                </td>
                            </tr>
                            <tr>
                                    <form action="chitietnhadat.do" method="post">
                                        <td></td>
                                        <td>
                                            <input type="hidden" name="msts" value="{matindang}">
                                                <xsl:attribute name="id">ban_msts<xsl:number value="position()" format="1"/>
                                                </xsl:attribute>
                                            </input>
                                        </td>
                                        <td>
<!--                                            <input type="submit" name="" value="Xem Thêm"/>-->
                                            <input type="image" src="images/Button.jpg" alt="Submit button"/>
                                        </td>
                                    </form>
                                </tr>
                        </table>
                        <hr/>
                    </body>
                </html>

            </xsl:if>
        </xsl:for-each>

    </xsl:template>

</xsl:stylesheet>
